package com.minhua.jijiehao2.mainframe.circle.businessListActivity.impl

import com.minhua.jijiehao2.base.BaseMvpPresenter
import com.minhua.jijiehao2.bean.BaseBean
import com.minhua.jijiehao2.bean.BusinessBean
import com.minhua.jijiehao2.http.CallBack
import com.minhua.jijiehao2.http.ParamsMap
import com.minhua.jijiehao2.mainframe.circle.businessListActivity.imp.IBusinessListPresenter
import com.minhua.jijiehao2.mainframe.circle.businessListActivity.imp.IBusinessListView

class BusinessListPresenter : BaseMvpPresenter<IBusinessListView>(), IBusinessListPresenter {
    private val mBusinessListModel = BusinessListModel()

    override fun getBusinessList(type: String) {
        val map = ParamsMap()
        map.put("type", type)
        mBusinessListModel.getBusinessList(map, object : CallBack<List<BusinessBean>>() {
            override fun onSuccess(t: BaseBean<List<BusinessBean>>) {
                v?.onListSuccess(t.data!!)
            }
        })
    }
}